package movie.test.as.seat.biz;

import java.util.List;
import java.util.Map;

import movie.test.as.seat.bean.SeatBean;
import movie.test.as.seat.dao.SeatDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSONObject;

@Component
public class SeatBiz {

	@Autowired
	private SeatDao seatDao;

	public List<Map<String, Object>> getSeatList(JSONObject objs) {

		return seatDao.getSeatList(objs);
	}

	public int updateSeatList(Integer numberX,Integer numberY, Integer hallId) {

		return seatDao.updateSeatList(numberX,numberY,hallId);
	}

	public int updateSeatsById(Integer numberX,Integer numberY, Integer hallId) {

		return seatDao.updateSeatsById(numberX,numberY,hallId);
	}

	public Map<String, Object> getSeatsByHallId(Integer id) {

		return seatDao.getSeatsByHallId(id);
	}

	public Integer addSeats(List<SeatBean> lists) {

		return seatDao.addSeats(lists);
	}

	public Integer deleteHallSeats(Integer hallId) {

		return seatDao.deleteHallSeats(hallId);

	}

	public int updateSeatsByHallId(JSONObject objs) {
		return seatDao.updateSeatsByHallId(objs);
	}

	public int updateReturnSeatsId(List seatList) {
		
		return  seatDao.updateReturnSeatsId(seatList);
	}

	public int updateReturnSeat(Integer seatX, Integer seatY, Integer hallId) {
		
		return seatDao.updateReturnSeat(seatX,seatY,hallId);
	}

}
